package com.ming.stringstudy.feedbacksystem.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 回复意见/问题表
 * </p>
 *
 * @author aming
 * @since 2024-12-24
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Reply implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)// 不允许反序列化
    private Integer id;
    /**
     * 绑定用户表
     */
    private Integer userId;
    /**
     * 绑定问题表的主键id
     */
    private Integer commentId;
    /**
     * 回复的文本
     */
    private String replyText;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

}
